package com.aliyun.order.client.model;

import java.io.Serializable;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import lombok.Data;

/**
 * 创建订单请求
 *
 * 
 * @date 2024/11/27
 */
@Data
public class CreateOrderRequest implements Serializable {

    private static final long serialVersionUID = -7303853147903605561L;

    @NotNull(message = "用户ID不能为空")
    @Min(value = 1, message = "用户ID无效")
    private Long userId;

    @NotNull(message = "商品ID不能为空")
    @Min(value = 1, message = "商品ID无效")
    private Long productId;

    @NotNull(message = "秒杀商品ID不能为空")
    @Min(value = 1, message = "秒杀商品ID无效")
    private Long flashSaleProductId;

    @NotNull(message = "购买数量不能为空")
    @Min(value = 1, message = "购买数量无效")
    private Integer quantity;
}